import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

//搭建路由环境
//将VueRouter注册为Vue的插件
import VueRouter from "vue-router";
Vue.use(VueRouter)
//创建路由
import A from "./pages/A"
import B from "./pages/B"
import C from "./pages/C"
const routes = [
  //一级路由的渲染位置 肯定是在一级组件app中
  {path:"/A",component:A},
  {path:"/B",component:B},
  {path:"/C",component:C}
]
//创建路由器 注册路由
const router = new VueRouter({routes})
//注册路由器
new Vue({
  render: h => h(App),
  router
}).$mount('#app')
